window: ignore resize increments for maximized/fullscreen
authorOlivier Fourdan <ofourdan@redhat.com>
Thu, 1 Oct 2015 13:46:50 +0000 (15:46 +0200)
committerOlivier Fourdan <ofourdan@redhat.com>
Thu, 1 Oct 2015 14:17:42 +0000 (16:17 +0200)
Once a window is maximized/fullscreen, resize increments should be
ignored otherwise the window may appear smaller than the screen size.

That also applies to configure requests as well.

https://bugzilla.gnome.org/show_bug.cgi?id=751368

gtk/gtkwindow.c

index 3a5adc864516a374c3ed7400568b22727ce94fe7..efde8423cac72ea5843338b6def2d1ccd2b161cc 100644 (file)
@@ -8799,7 +8799,12 @@ gtk_window_compute_configure_request_size (GtkWindow   *window,
     }
 
   /* Override any size with gtk_window_resize() values */
-  if (info)
+  if (priv->maximized || priv->fullscreen)
+    {
+      /* Unless we are maximized or fullscreen */
+      gtk_window_get_remembered_size (window, width, height);
+    }
+  else if (info)
     {
       if (info->resize_width > 0)
        *width = info->resize_width;